﻿using Abp.Configuration.Startup;
using Abp.Dependency;
using Castle.MicroKernel.Registration;
using Choucius.Boilerplate9.JobManagers;

namespace Choucius.Boilerplate9.Web.Host.Startup
{
    public class MyStartupTask : ITransientDependency
    {
        private readonly IAbpStartupConfiguration _configuration;

        public MyStartupTask(IAbpStartupConfiguration configuration)
        {
            _configuration = configuration;

            // 注册启动任务
            _configuration.IocManager.IocContainer.Register(
                Component.For<JobManager>()
                         .LifestyleTransient()
            );
        }
    }
}
